import os
from openai import OpenAI

# 数据库配置
DATABASE_URL = "mysql+pymysql://root:114514@localhost/weblexguard"
REDIS_HOST = "localhost"
REDIS_PORT = 6379
REDIS_DB = 0

# SMTP 服务器发件设置
SMTP_SERVER = ""
SMTP_PORT = 25
SMTP_SENDER_EMAIL = ""
SMTP_PASSWORD = ""

# 搜寻设置
MARK_ID = "jxnhu"  # 区分不同队列
MAX_DEPTH = 5
WHITELIST = ['www\.jxnhu\.edu\.cn/.*']  # 正则匹配的白名单
BLACKLIST = []
MAX_WORKERS = 5  # 同时 5 个线程

# 报表页面设置
HOST = "127.0.0.1"
PORT = 8088

# 语言模型对象初始化
BASE_URL = 'https://api.siliconflow.cn/v1/'
API_KEY = os.environ.get('API_KEY')
MODEL_CHECK = 'Qwen/QwQ-32B'
MODEL_SUMMARY = 'Qwen/Qwen2.5-72B-Instruct'

openai_client = OpenAI(
    base_url=BASE_URL,
    api_key=API_KEY
)